package com.sdu.hotel.entity.system;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Table;
import com.sdu.hotel.entity.base.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * @author xyh
 */

@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
@Table("sys_department")
public class SysDepartment extends BaseEntity implements Serializable {

//    @TableId(type = IdType.ASSIGN_ID)
//    private String departmentId;

    @Column("parent_id")
    private String parentId;

    @Column("department_name")
    private String departmentName;

    @Column("department_name_short")
    private String departmentNameShort;

    @Column("department_desc")
    private String departmentDesc;

    @Column("oa_department_id")
    private Integer oaDepartmentId;

    @Column("sort")
    private Integer sort;

//    @Column(value = "is_deleted")
//    @TableLogic
//    private int deleted = 0;
//
//    @Column(value = "create_time",fill = FieldFill.INSERT)
//    private Date createTime;

    @Column(value = "update_time",onInsertValue = "now()")
    private Date updateTime;
}
